import type { ProColumns } from '@ant-design/pro-table';

export type columnsDataType = {
  grade: string;
  metadataName: string;
  metadataUrl: string;
};

const columnsData: ProColumns<columnsDataType>[] = [
  // 配置搜索框
  {
    title: '等级',
    dataIndex: 'grade',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '身份名称',
    dataIndex: 'metadataName',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },

  // table里面的内容
  {
    title: '序号',
    dataIndex: 'order',
    valueType: 'indexBorder',
    hideInSearch: true,
    width: 50,
    fixed: 'left',
  },
  {
    title: '身份名称',
    width: 160,
    dataIndex: 'metadataName',
    hideInSearch: true,
    fixed: 'left',
  },
  {
    title: '等级',
    width: 160,
    dataIndex: 'grade',
    hideInSearch: true,
  },
  {
    title: '元数据image',
    dataIndex: 'metadataImage',
    width: 120,
    hideInSearch: true,
    valueType: 'image',
  },
  {
    title: '元数据',
    dataIndex: 'metadataUrl',
    hideInSearch: true,
  },
  {
    title: '操作',
    width: 100,
    hideInSearch: true,
    dataIndex: 'action',
    fixed: 'right',
  },
];

export default columnsData;
